﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JSON;

namespace Facebook_Graph_Toolkit.GraphApi {
    /// <summary>
    /// Represents a Graph Api object in Facebook
    /// </summary>
    [Serializable]
    public abstract class GraphApiObject {
        /// <summary>
        /// JsonObject data
        /// </summary>
        protected internal JsonObject data;
        /// <summary>
        /// The JsonObject behind
        /// </summary>
        public JsonObject JsonData { get { return data; } }
        /// <summary>
        /// Constructor with given JsonObject
        /// </summary>
        /// <param name="JO">JsonObject which contains the data in this object</param>
        protected internal GraphApiObject(JsonObject JO) { this.data = JO; }
        /// <summary>
        /// The string representation of the JsonObject behind
        /// </summary>
        /// <returns>String representation of JsonObject</returns>
        public override string ToString() {
            return data.ToString();
        }
    }
}
